$(document).ready(function(){
    var vConsole = new VConsole();
    // console.log(untils);
    var isweixin = isWeiXin();
    if (!isweixin){
        $('.qq_share_box').show();
        return false;
    }
    
    var shareTxt = "冬至和老孙的“火眼金睛”有关系？免费旅游名额等你拿！";
    var shareLink = "http://tpn.gzl.com.cn/static/game/WinterSolstice/html/playgame.html";
    //开始游戏
    $('.playgame_btn').click(function(){
        console.log('click');
        window.location = "http://weixin.gzl.cn/account/login.html?type=1&goToUrl=http://tpn.gzl.com.cn/static/game/WinterSolstice/html/index.html";
    })
    // 查看宝箱
    $('.trophy_btn').click(function(){
        $('.trophy_box').show();
    })

    // 活动规则
    $('.regular_btn').click(function(){
        $('.regular_box').show();
    })

    // 关闭弹框
    $('.close').click(function() {
        $('.pop_ups').hide();
    })

    //分享
    untils.weChatConfig(shareLink, shareTxt, function () {
        
    })

    function isWeiXin() {
        var ua = window.navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == 'micromessenger') {
            return true;
        } else {
            return false;
        }
    }
})